3.513 \(\int \cos (c+d x) (a+b \tan (c+d x)) \, dx\)

Optimal. Leaf size=24 \[ \frac{a \sin (c+d x)}{d}-\frac{b \cos (c+d x)}{d} \]

[Out]

-((b*Cos[c + d*x])/d) + (a*Sin[c + d*x])/d

________________________________________________________________________________________

Rubi [A]  time = 0.0196113, antiderivative size = 24, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 17, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.118, Rules used = {3486, 2637} \[ \frac{a \sin (c+d x)}{d}-\frac{b \cos (c+d x)}{d} \]

Antiderivative was successfully verified.

[In]

Int[Cos[c + d*x]*(a + b*Tan[c + d*x]),x]

[Out]

-((b*Cos[c + d*x])/d) + (a*Sin[c + d*x])/d

Rule 3486

Int[((d_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(b*(d*Sec[
e + f*x])^m)/(f*m), x] + Dist[a, Int[(d*Sec[e + f*x])^m, x], x] /; FreeQ[{a, b, d, e, f, m}, x] && (IntegerQ[2
*m] || NeQ[a^2 + b^2, 0])

Rule 2637

Int[sin[Pi/2 + (c_.) + (d_.)*(x_)], x_Symbol] :> Simp[Sin[c + d*x]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

\begin{align*} \int \cos (c+d x) (a+b \tan (c+d x)) \, dx &=-\frac{b \cos (c+d x)}{d}+a \int \cos (c+d x) \, dx\\ &=-\frac{b \cos (c+d x)}{d}+\frac{a \sin (c+d x)}{d}\\ \end{align*}

Mathematica [A]  time = 0.0187987, size = 46, normalized size = 1.92 \[ \frac{a \sin (c) \cos (d x)}{d}+\frac{a \cos (c) \sin (d x)}{d}+\frac{b \sin (c) \sin (d x)}{d}-\frac{b \cos (c) \cos (d x)}{d} \]

Antiderivative was successfully verified.

[In]

Integrate[Cos[c + d*x]*(a + b*Tan[c + d*x]),x]

[Out]

-((b*Cos[c]*Cos[d*x])/d) + (a*Cos[d*x]*Sin[c])/d + (a*Cos[c]*Sin[d*x])/d + (b*Sin[c]*Sin[d*x])/d

________________________________________________________________________________________

Maple [A]  time = 0.033, size = 23, normalized size = 1. \begin{align*}{\frac{-b\cos \left ( dx+c \right ) +a\sin \left ( dx+c \right ) }{d}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(d*x+c)*(a+b*tan(d*x+c)),x)

[Out]

1/d*(-b*cos(d*x+c)+a*sin(d*x+c))

________________________________________________________________________________________

Maxima [A]  time = 1.18442, size = 31, normalized size = 1.29 \begin{align*} -\frac{b \cos \left (d x + c\right ) - a \sin \left (d x + c\right )}{d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)*(a+b*tan(d*x+c)),x, algorithm="maxima")

[Out]

-(b*cos(d*x + c) - a*sin(d*x + c))/d

________________________________________________________________________________________

Fricas [A]  time = 1.84741, size = 51, normalized size = 2.12 \begin{align*} -\frac{b \cos \left (d x + c\right ) - a \sin \left (d x + c\right )}{d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)*(a+b*tan(d*x+c)),x, algorithm="fricas")

[Out]

-(b*cos(d*x + c) - a*sin(d*x + c))/d

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (a + b \tan{\left (c + d x \right )}\right ) \cos{\left (c + d x \right )}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)*(a+b*tan(d*x+c)),x)

[Out]

Integral((a + b*tan(c + d*x))*cos(c + d*x), x)

________________________________________________________________________________________

Giac [B]  time = 1.24499, size = 174, normalized size = 7.25 \begin{align*} -\frac{b \tan \left (\frac{1}{2} \, d x\right )^{2} \tan \left (\frac{1}{2} \, c\right )^{2} + 2 \, a \tan \left (\frac{1}{2} \, d x\right )^{2} \tan \left (\frac{1}{2} \, c\right ) + 2 \, a \tan \left (\frac{1}{2} \, d x\right ) \tan \left (\frac{1}{2} \, c\right )^{2} - b \tan \left (\frac{1}{2} \, d x\right )^{2} - 4 \, b \tan \left (\frac{1}{2} \, d x\right ) \tan \left (\frac{1}{2} \, c\right ) - b \tan \left (\frac{1}{2} \, c\right )^{2} - 2 \, a \tan \left (\frac{1}{2} \, d x\right ) - 2 \, a \tan \left (\frac{1}{2} \, c\right ) + b}{d \tan \left (\frac{1}{2} \, d x\right )^{2} \tan \left (\frac{1}{2} \, c\right )^{2} + d \tan \left (\frac{1}{2} \, d x\right )^{2} + d \tan \left (\frac{1}{2} \, c\right )^{2} + d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)*(a+b*tan(d*x+c)),x, algorithm="giac")

[Out]

-(b*tan(1/2*d*x)^2*tan(1/2*c)^2 + 2*a*tan(1/2*d*x)^2*tan(1/2*c) + 2*a*tan(1/2*d*x)*tan(1/2*c)^2 - b*tan(1/2*d*
x)^2 - 4*b*tan(1/2*d*x)*tan(1/2*c) - b*tan(1/2*c)^2 - 2*a*tan(1/2*d*x) - 2*a*tan(1/2*c) + b)/(d*tan(1/2*d*x)^2
*tan(1/2*c)^2 + d*tan(1/2*d*x)^2 + d*tan(1/2*c)^2 + d)